<!doctype html>
<html lang="en">
  <head>
    <title>安装qBittorrent Nox并设置开机自启 // 老宋的博客</title>
    <link rel="shortcut icon" href="/favicon.ico" />
    <meta charset="utf-8" />
    <meta name="generator" content="Hugo 0.135.0">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="author" content="老宋" />
    <meta name="description" content="" />
    <link rel="stylesheet" href="/css/main.min.5b1fcc8902588589c4767187402a3c29f8b8d7a6fdef6d9f8f77045bb0d14fee.css" />
    

    
    
  <meta name="twitter:card" content="summary">
  <meta name="twitter:title" content="安装qBittorrent Nox并设置开机自启">
  <meta name="twitter:description" content="安装qBittorrent 安装软件 运行安装qb的命令：
apt update apt install qbittorrent-nox 等待命令执行完即可。
创建服务 安装完成后，我们创建qBittorrent这个服务，方便设置开机自启。
执行如下命令：
vim /etc/systemd/system/qbittorrent.service 然后将下面的内容粘贴并保存：
[Unit] Description=qBittorrent Daemon Service After=network.target [Service] User=root ExecStart=/usr/bin/qbittorrent-nox ExecStop=/usr/bin/killall -w qbittorrent-nox [Install] WantedBy=multi-user.target 执行下面的命令更新服务：
systemctl daemon-reload 常用命令 启动qb service qbittorrent start 关闭qb service qbittorrent stop 查看qb状态 service qbittorrent status 开机自启 systemctl enable qbittorrent 关闭开机自启 systemctl disable qbitorrent ">

    <meta property="og:url" content="https://blog.laosong.wang/posts/%E5%AE%89%E8%A3%85qbittorrent-nox%E5%B9%B6%E8%AE%BE%E7%BD%AE%E5%BC%80%E6%9C%BA%E8%87%AA%E5%90%AF/">
  <meta property="og:site_name" content="老宋的博客">
  <meta property="og:title" content="安装qBittorrent Nox并设置开机自启">
  <meta property="og:description" content="安装qBittorrent 安装软件 运行安装qb的命令：
apt update apt install qbittorrent-nox 等待命令执行完即可。
创建服务 安装完成后，我们创建qBittorrent这个服务，方便设置开机自启。
执行如下命令：
vim /etc/systemd/system/qbittorrent.service 然后将下面的内容粘贴并保存：
[Unit] Description=qBittorrent Daemon Service After=network.target [Service] User=root ExecStart=/usr/bin/qbittorrent-nox ExecStop=/usr/bin/killall -w qbittorrent-nox [Install] WantedBy=multi-user.target 执行下面的命令更新服务：
systemctl daemon-reload 常用命令 启动qb service qbittorrent start 关闭qb service qbittorrent stop 查看qb状态 service qbittorrent status 开机自启 systemctl enable qbittorrent 关闭开机自启 systemctl disable qbitorrent ">
  <meta property="og:locale" content="en">
  <meta property="og:type" content="article">
    <meta property="article:section" content="posts">
    <meta property="article:published_time" content="2024-09-18T20:35:31+08:00">
    <meta property="article:modified_time" content="2024-09-18T20:35:31+08:00">
    <meta property="article:tag" content="Linux">
    <meta property="article:tag" content="玩客云">
    <meta property="article:tag" content="Onecloud">
    <meta property="article:tag" content="QBittorrent">


  </head>
  <body>
    <header class="app-header">
      <a href="https://blog.laosong.wang/"><img class="app-header-avatar" src="/avatar.jpg" alt="老宋" /></a>
      <span class="app-header-title">老宋的博客</span>
      <nav class="app-header-menu">
          <a class="app-header-menu-item" href="/">首页</a>
             - 
          
          <a class="app-header-menu-item" href="/tags/">标签</a>
             - 
          
          <a class="app-header-menu-item" href="/about/">关于我</a>
      </nav>
      <p>一个网店店主的生活记录</p>
      <div class="app-header-social">
        
          <a href="https://space.bilibili.com/337405147" target="_blank" rel="noreferrer noopener me">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-bilibili">
  <title>Bilibili</title>
  <path d="M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373Z"/>
</svg>
          </a>
        
      </div>
    </header>
    <main class="app-container">
      
  <article class="post">
    <header class="post-header">
      <h1 class ="post-title">安装qBittorrent Nox并设置开机自启</h1>
      <div class="post-meta">
        <div>
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-calendar">
  <title>calendar</title>
  <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
          2024-09-18
        </div>
        <div>
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-clock">
  <title>clock</title>
  <circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>
</svg>
          1 min read
        </div>
        <div>
          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tag">
  <title>tag</title>
  <path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>
</svg>
              <a class="tag" href="https://blog.laosong.wang/tags/linux/">Linux</a>
              <a class="tag" href="https://blog.laosong.wang/tags/%E7%8E%A9%E5%AE%A2%E4%BA%91/">玩客云</a>
              <a class="tag" href="https://blog.laosong.wang/tags/onecloud/">Onecloud</a>
              <a class="tag" href="https://blog.laosong.wang/tags/qbittorrent/">QBittorrent</a>
        </div>
      </div>
    </header>
    <div class="post-content">
      <h2 id="安装qbittorrent">安装qBittorrent</h2>
<h3 id="安装软件">安装软件</h3>
<p>运行安装qb的命令：</p>
<pre tabindex="0"><code>apt update
apt install qbittorrent-nox
</code></pre><p>等待命令执行完即可。</p>
<h3 id="创建服务">创建服务</h3>
<p>安装完成后，我们创建qBittorrent这个服务，方便设置开机自启。</p>
<p>执行如下命令：</p>
<pre tabindex="0"><code>vim /etc/systemd/system/qbittorrent.service
</code></pre><p>然后将下面的内容粘贴并保存：</p>
<pre tabindex="0"><code>[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
User=root
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox
[Install]
WantedBy=multi-user.target
</code></pre><p>执行下面的命令更新服务：</p>
<pre tabindex="0"><code>systemctl daemon-reload
</code></pre><h3 id="常用命令">常用命令</h3>
<pre tabindex="0"><code>启动qb
service qbittorrent start

关闭qb
service qbittorrent stop

查看qb状态
service qbittorrent status

开机自启
systemctl enable qbittorrent

关闭开机自启
systemctl disable qbitorrent
</code></pre>
      <hr>
      <h2 id="喝杯奶茶">喝瓶汽水</h2>
      <p><img src="/buy-me-a-bubble-tea.jpg" alt=""></p>
    </div>
    <div class="post-footer">
      
    </div>
  </article>

    </main>
  </body>
  <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id:"3KFf3rWubjm5ya1R",ck:"3KFf3rWubjm5ya1R"})</script>
</html>
